//
//  MagazineFooterTableViewCell.m
//  HelpThePoor
//
//  Created by van7ish on 2016/12/4.
//  Copyright © 2016年 van7ish. All rights reserved.
//

#import "MagazineFooterTableViewCell.h"

@implementation MagazineFooterTableViewCell

- (UIImageView *)greenImageView{
    if (!_greenImageView) {
        _greenImageView = [[UIImageView alloc] initWithFrame:CGRectMake(WidthScale(15), HeightScale(23), WidthScale(3.5), HeightScale(14))];
        _greenImageView.image = ImageNamed(@"矩形-75-拷贝-2");
    }
    return _greenImageView;
}

- (UILabel *)titleLabel{
    if (!_titleLabel) {
        _titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(CGRectGetMaxX(self.greenImageView.frame) + WidthScale(15), HeightScale(10), WidthScale(100), HeightScale(40))];
        _titleLabel.text = @"期刊简介";
        _titleLabel.textColor = COLOR_FONTBLACK;
        _titleLabel.font = FONTSIZE(17);
    }
    return _titleLabel;
}

- (UILabel *)sizeLabel{
    if (!_sizeLabel) {
        _sizeLabel = [[UILabel alloc] initWithFrame:CGRectMake(SCREEN_W - WidthScale(80), self.titleLabel.frame.origin.y, WidthScale(65), self.titleLabel.frame.size.height)];
        _sizeLabel.text = @"20M";
        _sizeLabel.textColor = COLOR_FONTBLACK;
        _sizeLabel.font = FONTSIZE(17);
        _sizeLabel.textAlignment = NSTextAlignmentRight;
    }
    return _sizeLabel;
}

- (UITextView *)descTextView{
    if (!_descTextView) {
        _descTextView = [[UITextView alloc] initWithFrame:CGRectMake(WidthScale(15), HeightScale(53), SCREEN_W - WidthScale(30), HeightScale(138))];
        _descTextView.text = @"        来得及安防裸考军队浪费就对啦房间里的积分离开家打算风口浪尖的咖啡机多亏了附近卡洛斯解放路的撒酒疯看得见付款的减肥减肥我荆防颗粒及覅而肌肤即可分解付金额非积分洁净房开房间诶房间卡飞机IE积分卡积分扣积分卡进房间啊节疯狂疯狂减肥就发件方拉斯减肥看大家回复咖啡地方地方阿萨德发的v地方大幅度方法地方答复发答复大发放地方大师傅大师傅答复等发达书法第三方发送到发的";
        _descTextView.textColor = COLOR_FONTGRAY;
        _descTextView.backgroundColor = COLOR_LIGHTBGCOLOR;
        _descTextView.editable = NO;
        _descTextView.font = FONTSIZE(15.5);
    }
    return _descTextView;
}

- (void)layoutSubviews{
    [super layoutSubviews];
    
    self.selectionStyle = UITableViewCellSelectionStyleNone;
    self.backgroundColor = COLOR_LIGHTBGCOLOR;
    [self.contentView addSubview:self.greenImageView];
    [self.contentView addSubview:self.titleLabel];
    [self.contentView addSubview:self.sizeLabel];
    [self.contentView addSubview:self.descTextView];
}

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
